<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/page/common/public.jspf"%>
<%@ page import="com.hengpeng.itfints.tools.PageUtil" %>
<% 
	PageUtil pageUtil = (PageUtil)request.getAttribute("PageUtil");
%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="${path }/favicon.ico" />
<link href="${skin }/theme.css" rel="stylesheet" type="text/css" />
<link href="${skin }/member.css" rel="stylesheet" type="text/css" />
<script src="${path }/js/common/jquery1.10.2.min.js"></script>
<script src="${path }/js/common/helper.js?v=${v}"></script>
<script src="${path }/js/common/cookie.js?v=${v}"></script>
<title>会员中心-资金明细</title>
<style type="text/css">
body{background:#F5F5F5;}
.logo_main_bor{box-shadow: 0px 2px 6px rgba(2, 0, 0, 0.1);}
</style>
</head>
<body>
<c:import url="../../include/head.jsp"></c:import>
<c:import url="../../include/logo_menu.jsp">
	<c:param name="type" value="index"></c:param>
</c:import>

<div class="youarehere">
	<div class="localtion"><a href="${path }/">首页</a> » 资金明细</div>
</div>

<div class="wrapper auto_height">

<c:import url="../left.jsp"></c:import>

<div class="bodyright l" style="width:778px;">
	<div class="line_EAEAEA auto_height" style="background: #fff;margin-bottom: 20px;">
	<div style="padding: 12px">
		<div class="hkjh_top_ul1_li1div1">资金明细</div>
	</div>
	
<div class="dh_pub_list2 clearfix" id="tags">
       <ul>
       	   <li style="width: 20px;"><a></a></li>
       	   <input type="hidden" name="type" id="type" value="${type}" />
           <c:choose> 
			     <c:when test="${type eq 'IMPREST'}"> 
			      	<li><a class="overbg"  href="javascript:void(0);" onclick="javascript:selectType('IMPREST');">充值记录</a></li>
           			<li><a href="javascript:void(0);"  onclick="javascript:selectType('DRAW');">提现记录</a></li>
           			<li><a href="javascript:void(0);" onclick="javascript:selectType('INVEST');">投资记录</a></li>
			     </c:when> 
			     <c:when test="${type eq 'DRAW'}"> 
			      	<li><a  href="javascript:void(0);" onclick="javascript:selectType('IMPREST');">充值记录</a></li>
           			<li><a class="overbg"  href="javascript:void(0);" onclick="javascript:selectType('DRAW');">提现记录</a></li>
           			<li><a href="javascript:void(0);" onclick="javascript:selectType('INVEST');">投资记录</a></li>
			     </c:when> 
			     <c:when test="${type eq 'INVEST'}"> 
			      	<li><a  href="javascript:void(0);" onclick="javascript:selectType('IMPREST');">充值记录</a></li>
           			<li><a  href="javascript:void(0);" onclick="javascript:selectType('DRAW');">提现记录</a></li>
           			<li><a  class="overbg"  href="javascript:void(0);" onclick="javascript:selectType('INVEST');">投资记录</a></li>
			     </c:when> 
			     <c:otherwise> 
			      	 <li><a class="overbg"  href="javascript:void(0);" onclick="javascript:selectType('IMPREST');">充值记录</a></li>
           			 <li><a  href="javascript:void(0);" onclick="javascript:selectType('DRAW');">提现记录</a></li>
           			 <li><a href="javascript:void(0);" onclick="javascript:selectType('INVEST');">投资记录</a></li>
			     </c:otherwise>
		    </c:choose>
       </ul>
       <ul>
       <li style="position:relative;float: right;right: 10px;">
		    账户余额：<span class="red"><fmt:formatNumber value="${account.baseMoney/100}" type="currency" pattern="￥.00"/></span>   
		   可投金额：<span class="red"><fmt:formatNumber value="${account.baseMoney/100 - baseMoney.freezeMoney/100}" type="currency" pattern="￥.00"/></span>
       </li>
       </ul>
</div>

<div style="padding:0 12px">
	<div class="section query" style="display: ;">
		<div class="thats" style="padding-bottom: 6px;">
			<div class="s_16">时间：</div>
			<div class="l">
				<select name="queryTime" id="queryTime" onchange="selectTime()">
					<option value="three_day" ${queryTime eq 'three_day' ? 'selected' : ''}>三天以内</option>
					<option value="one_week" ${queryTime eq 'one_week' ? 'selected' : ''}>一周以内</option>
					<option value="one_month" ${queryTime eq 'one_month' ? 'selected' : ''}>一个月以内</option>
					<option value="three_month" ${queryTime eq 'three_month' ? 'selected' : ''}>三个月以内</option>
				</select>
			</div>
		</div>
	</div>
</div>

<ul class="account_item_title">
	<li style="text-align:center;width:186px;">时间</li>
	<li style="width: 150px;">
		<c:choose> 
		     <c:when test="${type eq 'IMPREST'}">充值金额(元)</c:when> 
		     <c:when test="${type eq 'DRAW'}">提现金额(元)</c:when> 
		     <c:when test="${type eq 'INVEST'}">投资金额(元)</c:when> 
		     <c:otherwise>充值金额(元)</c:otherwise>
	    </c:choose>
	</li>
	<li style="width: 138px;">交易形式</li>
	<li style="width: 180px;">交易后可用余额(元)</li>
	<li style="width:122px;text-align:center;">流水号</li>
</ul>
<c:choose> 
     <c:when test="${fn:length(myAccountLogList) > 0}">
      		<c:forEach items="${myAccountLogList}" var="accountLog" varStatus="vstatus">
				<c:choose>
		            <c:when test="${vstatus.index%2 == 0}">
		            	<ul class="account_item_title2">                                                                                                    
							<li style="text-align:center;width:186px;"><fmt:formatDate value="${accountLog.createTime}" type="both" pattern="yyyy/MM/dd hh:mm:ss"/></li>
							<li style="width: 150px;">￥${accountLog.money/100}</li>
							<li style="width: 138px;">${accountLog.tradeMode.text}</li>
							<li style="width: 180px;">￥${accountLog.remnantBaseMoney/100 - accountLog.remnantFreezeMoney/100}</li>
							<li style="width:122px;text-align:center;" class="green">${accountLog.id}</li>
						</ul>
		            </c:when> 
		            <c:otherwise> 
		            	<ul class="account_item_title3">                                          
							<li style="text-align:center;width:186px;"><fmt:formatDate value="${accountLog.createTime}" type="both" pattern="yyyy/MM/dd hh:mm:ss"/></li>
							<li style="width: 150px;">￥${accountLog.money/100}</li>
							<li style="width: 138px;">${accountLog.tradeMode.text}</li>
							<li style="width: 180px;">￥${accountLog.remnantBaseMoney/100 - accountLog.remnantFreezeMoney/100}</li>
							<li style="width:122px;text-align:center;" class="green">${accountLog.id}</li>
						</ul>
		            </c:otherwise>
		        </c:choose>
		    </c:forEach>
	 </c:when>
	 <c:otherwise>
	 	<div class="s_13">
			<div style="line-height: 60px; font-size: 16px; text-align: center;">暂无记录</div>
		</div>
	 </c:otherwise>    
</c:choose>
<div class="clearfix section"></div>	
<div class="paginations">
		<div class="page-bottom">
			记录总数<%=pageUtil.getTotalCount()%>条 当前页/总页数<%=pageUtil.getCurrentPage()%> 
			/<%=pageUtil.getPageCount()%>每页显示<%=pageUtil.getPageSize()%>条 
			<a onclick="javascript:go(1,<%=pageUtil.getPageCount()%>);" href="javascript:void(0);" name="pagebar_frist" class="page-start"><span>首页</span></a> 
			<a onclick="javascript:go(<%=(pageUtil.getCurrentPage() - 1)%>,<%=pageUtil.getPageCount()%>);" href="javascript:void(0);" name="pagebar_pre" class="page-prev"><span>上一页</span></a> 
			<a onclick="javascript:go(<%=(pageUtil.getCurrentPage() + 1)%>,<%=pageUtil.getPageCount()%>);" href="javascript:void(0);" name="pagebar_next" class="page-next"><span>下一页</span></a> 
			<a onclick="javascript:go(<%=pageUtil.getPageCount()%>,<%=pageUtil.getPageCount()%>);" href="javascript:void(0);" name="pagebar_last" class="page-end"><span>末页</span></a> 
		</div>
	</div>
</div>

</div>
</div>
<script type="text/javascript">
	function selectType (type) {
		var queryTime = $("#queryTime").val();
		window.location.href = "<%=request.getContextPath()%>/memberCenter/myAccountLogList.htm?queryTime="+queryTime+"&type="+type+"";
	}
	function selectTime () {
		var type = $("#type").val();
		var queryTime = $("#queryTime").val();
		window.location.href = "<%=request.getContextPath()%>/memberCenter/myAccountLogList.htm?queryTime="+queryTime+"&type="+type+"";
	}
	//分页
	function go (page, total) {
		if (page > total) {
			page = total;
		}
		var type = $("#type").val();
		var queryTime = $("#queryTime").val();
		window.location.href = "<%=request.getContextPath()%>/memberCenter/myAccountLogList.htm?queryTime="+queryTime+"&type="+type+"&curPage="+page+"";
	}
</script>
<!-- 友情链接 -->
<c:import url="../../include/links.jsp"></c:import>

<!-- 版权所有 -->
<c:import url="../../include/copyright.jsp"></c:import>
</body>
</html>